<?php

/**
 * Add Photo actions
 * 
 * @see AnSekitAction
 */
class ComHelloHelperPost extends ComHelloHelperAction
{
	
	/**
	 * Add Actions to the context
	 * 
	 * @param KViewTemplate
	 * @param AnCsArray $actions
	 * @return void
	 */
	public function HelloActions($view, $actions, $data)
	{	
		$post = $view->post;
				
		if ( $post->getAcl()->allowUpdate() )
		{
			$url = 'index.php?option=com_hello&view=post&layout=edit&id='.$post->id;
			$actions[self::EDIT] = 	$this->link( JText::_('AN-HELLO-ACTION-EDIT'), $url);
		}
			
		if( $post->owner->getAcl()->allowAdministration() )
		{
			$url = 'index.php?option=com_hello&view=post&action=delete&id='.$post->id;
			
			$actions[self::DELETE] = $this->link( JText::_('AN-HELLO-ACTION-DELETE'), $url)
								->action('post');
		}							
	}
	
//end class	
}